cet: Make a simple copy when source and target are in UTF-8.
authoroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 20 Feb 2007 19:40:52 +0000 (19:40 +0000)
committeroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 20 Feb 2007 19:40:52 +0000 (19:40 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2674 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/cet.c

index abc8b64b69108f2bca72491fd8ae61d313819cef..99a99a4f288af3b5311a3841761a6eff593e8698 100644 (file)
@@ -305,6 +305,7 @@ cet_str_any_to_utf8(const char *src, const cet_cs_vec_t *vec)
 
        cin = (char *)src;
        if (cin == NULL) return NULL;
+       if (vec->ucs4_count == 0) return xstrdup(src); /* UTF-8 -> UTF-8 */
 
        len = 0;
        while (*cin != '\0')            /* determine length of resulting UTF-8 string */